#ifndef __LENGTH_UNIT_H__
#define __LENGTH_UNIT_H__

#include <iostream>
#include <vector>
#include "AbstractUnit.h"

using namespace std;


//static set<Unit, UnitDescendingOrderComp<Unit> > StdUnitSet;
//set<Unit*, UnitDescendingOrderComp<Unit> > OrderedStdUnit::orderedStdUnit_m;


class LengthUnit : public Unit
{


public:

    LengthUnit(float factorToBase, string name):Unit(factorToBase, name){/*orderedStdUnit_m.insertUnit(this);*/};
    LengthUnit(const LengthUnit& lenUnit):Unit(lenUnit){/*UnitSet.insert(*this);*/};
    //~LengthUnit(){OrderedStdUnit::erase(this);};

   
    const static LengthUnit& getMILEUnit();
    const static LengthUnit& getYARDUnit();
    const static LengthUnit& getFEETUnit();
    const static LengthUnit& getINCHUnit();
    //static set<LengthUnit, UnitDescendingOrder>& getUnitSet();
	
      
};


const static float UNIT_MILE_TO_YARD = 1760;
const static float UNIT_YARD_TO_FEET = 3;
const static float UNIT_FEET_TO_INCH = 12;

const static float UNIT_MILE_TO_INCH = UNIT_MILE_TO_YARD * UNIT_YARD_TO_FEET * UNIT_FEET_TO_INCH;
const static float UNIT_YARD_TO_INCH = UNIT_YARD_TO_FEET * UNIT_FEET_TO_INCH;

const static LengthUnit& MILE = LengthUnit::getMILEUnit();
const static LengthUnit& YARD = LengthUnit::getYARDUnit();
const static LengthUnit& FEET = LengthUnit::getFEETUnit();
const static LengthUnit& INCH = LengthUnit::getINCHUnit();


const static LengthUnit StdUnit[] = {MILE, YARD, FEET, INCH};

//const static vector<LengthUnit> StdUnit = boost::list_of(MILE)( YARD)( FEET)(INCH);



//static UnitSortOrderSet& UnitOrderSet 

#endif
